<template>
  <ant-modal
    modalWidth="576"
    modalHeight="500"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="用户" prop="userId">
            <select-user v-model="form.userId" select-model="single" placeholder="请选择用户" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="地区" prop="regionId">
            <select-region v-model="form.regionId" placeholder="请选择地区" />
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="发帖数" prop="publishPostNumber">
            <a-input-number v-model="form.publishPostNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="发评数" prop="publishCommentNumber">
            <a-input-number v-model="form.publishCommentNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="浏览数" prop="postNumber">
            <a-input-number v-model="form.postNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="评论数" prop="commentNumber">
            <a-input-number v-model="form.commentNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="点赞数" prop="likeNumber">
            <a-input-number v-model="form.likeNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="收藏数" prop="collectNumber">
            <a-input-number v-model="form.collectNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="被评论数" prop="beCommentNumber">
            <a-input-number v-model="form.beCommentNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="被赞数" prop="beLikeNumber">
            <a-input-number v-model="form.beLikeNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="6">
          <a-form-model-item label="被收藏数" prop="beCollectNumber">
            <a-input-number v-model="form.beCollectNumber" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import UserRecordAddForm from './UserRecordForm'
export default {
  ...UserRecordAddForm
}
</script>
